#!/bin/sh
# Args: $1 = 0-1 matrix file
# wrapper to call mathematica from the command line

usage() {
    echo "Usage: $(basename $0) Mathematica.m file matrix_file"
}

if [ $# -lt 2 ] ; then
    usage >&2
    exit 1;
fi

mfile="$1"
matrix="$2"

# text file containing mathematica commands
math -noprompt -run "file=\"$matrix\";<<$mfile"

